/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023.
 * Description: support hisi-1380 SoC double cluster booting.
 * Author: wanqian <wanqian10@huawei.com>
 * Create: 2023-09-05
 * Note: this file isn't compiled independently, it is includded
 * in main.c
 */

#ifdef CONFIG_RTOS_HAL_DOUBLE_CLUSTER
/* global variable is default as 0 */
unsigned int cluster_id;
unsigned int get_cluster_id(void)
{
	return cluster_id;
}
EXPORT_SYMBOL(get_cluster_id);

static void get_cluster_info(void)
{
	struct device_node *node;

	node = of_find_compatible_node(NULL, NULL, "cluster_info");
	if (!node) {
		printk("not found cluster_info in dtb\n");
		return;
	}
	if (of_property_read_u32(node, "cluster_id", &cluster_id)) {
		printk("cluster id not found\n");
		return;
	}
}
#endif
